﻿
@{
    ViewData["Title"] = "用户管理";
}

<blockquote class="layui-elem-quote quoteBox">
    <form class="layui-form">
        @Html.AntiForgeryToken()
        <div class="layui-inline">
            <div class="layui-input-inline">
                <input type="text" class="layui-input searchVal" placeholder="请输入用户名称或真实姓名" />
            </div>
        </div>
        <div class="layui-inline">
            <div class="layui-input-inline">
                <select name="searchRoleId" class="searchRoleId" lay-search="">
                    <option value="">所有用户</option>
                    <option value="3">营业部</option>
                    <option value="4">高级代理</option>
                    @*<option value="5">中级代理</option>*@
                    <option value="6">直客</option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <div class="layui-input-inline">
                <select name="searchState" class="searchState" lay-search="">
                    <option value="">所有审核</option>
                    <option value="1">已审核</option>
                    <option value="0">未审核</option>
                    <option value="2">已拒绝</option>
                </select>
            </div>
            <a class="layui-btn search_btn" data-type="reload">搜索</a>
        </div>

        @*<div class="layui-inline">
            <a class="layui-btn layui-btn-normal addManager_btn" style="display:none;"><i class="layui-icon">&#xe61f;</i>添加用户</a>
        </div>
        <div class="layui-inline">
            <a class="layui-btn layui-btn-danger layui-btn-normal delAll_btn" style="display:none;"><i class="layui-icon layui-icon-delete"></i>批量删除</a>
        </div>*@
        
    </form>
</blockquote>
<table id="managerList" lay-filter="managerList"></table>
<!--操作-->
@*<script type="text/html" id="managerListBar">
    <a class="layui-btn layui-btn-sm" lay-event="preview">查看</a>
    <a class="layui-btn layui-btn-sm layui-btn-green" lay-event="trade">手续费</a>
    <a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="resetpwd">重置密码</a>
</script>*@
<script type="text/html" id="IsLock">
    {{#  if(d.IsLock ===true){ }}
    <input type="checkbox" name="IsLock" value="{{d.Id}}" lay-filter="IsLock" lay-skin="switch" lay-text="是|否" checked>
    {{#  } else{ }}
    <input type="checkbox" name="IsLock" value="{{d.Id}}" lay-filter="IsLock" lay-skin="switch" lay-text="是|否">
    {{#  }}}
</script>
<script type="text/html" id="State">
    {{#  if(d.State === 1){ }}
    {{#  if(d.IsLock ===true && d.RoleId == 3){ }}
    <strong>视频认证: </strong>
    <input type="checkbox" name="IsLock" value="{{d.Id}}" lay-filter="IsLock" lay-skin="switch" lay-text="是|否">
    {{#  } else if(d.IsLock ===true && d.RoleId != 3){ }}
    <a class="layui-btn layui-btn-xs layui-btn-warm">审核中</a>
    {{#  } else { }}
    <a class="layui-btn layui-btn-xs">通过</a>
    {{#  }}}
    {{#  } else if(d.State === 2){ }}
    <a class="layui-btn layui-btn-xs layui-btn-disabled">不通过</a>&nbsp;
    <i class="layui-icon" lay-event="audit_remark" title="驳回原因">&#xe60b;</i>
    {{#  } else{ }}
    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="state">未审核</a>
    {{#  }}}
    {{# if(d.State===2 || d.IsLock==true){ }}
    <a class="layui-btn layui-btn-xs layui-btn-warm" lay-event="resetApply">重申</a>
    {{# } }}
</script>
@section Scripts{
    <script type="text/javascript" src="~/layui/layui.js"></script>
    <script type="text/javascript" src="~/js/manager/managerList.js?_=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
}